/*
 * myradio_send.h
 *
 *  Created on: 2013.04.28.
 *      Author: Gábor
 */

#ifndef MYRADIO_SEND_H_
#define MYRADIO_SEND_H_

#include "bsp.h"

#define SI446X_CMD_ARG_COUNT_START_TX 6
#define SI446X_CMD_ID_START_TX 0x31
#define SI446X_CMD_ID_WRITE_TX_FIFO 0x66


extern U8 Pro2Cmd[16];
//extern struct si446x_reply_GET_INT_STATUS_map GET_INT_STATUS;


typedef struct si446x_reply_GET_INT_STATUS_map {
    U8  INT_PEND;
    U8  INT_STATUS;
    U8  PH_PEND;
    U8  PH_STATUS;
    U8  MODEM_PEND;
    U8  MODEM_STATUS;
    U8  CHIP_PEND;
    U8  CHIP_STATUS;
}si446x_reply_GET_INT_STATUS;

si446x_reply_GET_INT_STATUS GET_INT_STATUS;

bool vSampleCode_SendFixPacket(void);
void  vRadio_StartTx(U8 channel, U8 *pioFixRadioPacket);

void si446x_write_tx_fifo(U8 numBytes, U8* pTxData);
void si446x_start_tx(U8 CHANNEL, U8 CONDITION, U16 TX_LEN);

void si446x_get_int_status(U8 PH_CLR_PEND, U8 MODEM_CLR_PEND, U8 CHIP_CLR_PEND);

void DemoApp_Pollhandler();

#endif /* MYRADIO_SEND_H_ */
